<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>商品详情</title>
    <link rel="stylesheet" href="css/_all-skins.min.css"/>
    <link rel="stylesheet" href="css/AdminLTE.min.css"/>
    <link rel="stylesheet" href="css/bootstrap.min.css"/>
    <link rel="stylesheet" href="css/font-awesome.min.css"/>
</head>
<style>
    .table_base_title {
        background: #666666;
        color: white;
        width: 70px !important;
        max-width: 70px;
    }

    .base_infor {
        height: 150px;
        font-size: 12px;
        background: white;

        text-align: center;
    }

    .base_infor1 {
        height: 30px;
        background: #999999;
    }

    .product_num {
        height: 100px;
        margin-top: 20px;
        font-size: 12px;
        text-align: center;
        background: white;
    }

    td, th {
        border: solid 1px #C7C7C7;
    }

    .pic_infor {
        height: 240px;
        font-size: 12px;
        margin-top: 20px;
        text-align: center;
        background: white;
    }

    table {
        min-width: 600px;
    }

    .all_num, .up_num {
        width: 100px;
    }

    .pic_data td {
        min-width: 18.7%;
    }

</style>
<body class="hold-transition skin-blue sidebar-mini fixed">
<div class="wrapper">

    <header class="main-header">
        <!-- Logo -->
        <div class="logo">
            <!-- mini logo for sidebar mini 50x50 pixels -->

            <!-- logo for regular state and mobile devices -->
            <span class="logo-lg"><b>SuitLove</b></span>
        </div>
        <!-- Header Navbar: style can be found in header.less -->
        <nav class="navbar navbar-static-top">
            <!-- Sidebar toggle button-->
            <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
                <span class="sr-only">Toggle navigation</span>
            </a>

            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">
                    <li class="dropdown user user-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">

                            <img src="img/user2-160x160.jpg" class="user-image" alt="User Image">
                            <span class="hidden-xs  manger-name">Amy</span>

                            <span class="change_password" style="font-size: 12px;margin-left: 40px;">修改密码</span>
                            <span class="exit_login" style="font-size: 12px;">退出登录</span>
                        </a>

                    </li>
                </ul>
            </div>
        </nav>
    </header>
    <!-- Left side column. contains the logo and sidebar -->
    <aside class="main-sidebar">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
            <!-- Sidebar user panel -->
            <div class="user-panel">
                <div class="pull-left image">
                    <img src="img/user2-160x160.jpg" class="img-circle">
                </div>
                <div class="pull-left info">
                    <p class="manger-name">Amy</p>
                    <a href="#"><i class="fa fa-circle text-success"></i> 在线</a>
                </div>
            </div>
            <!-- search form -->
            <form action="#" method="get" class="sidebar-form">
                <!--<div class="input-group">-->
                    <!--<input type="text" name="q" class="form-control" placeholder="Search...">-->
                    <!--<span class="input-group-btn">-->
                <!--<button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>-->
                <!--</button>-->
              <!--</span>-->
                <!--</div>-->
            </form>
            <!-- /.search form -->
            <!-- sidebar menu: : style can be found in sidebar.less -->
            <ul class="sidebar-menu" data-widget="tree">
                <li class="header">功能目录</li>

                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-dashboard"></i> <span>系统首页</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="id_manager.html"><i class="fa fa-circle-o"></i> 账号管理</a></li>
                    </ul>
                </li>

                <li class="active treeview">
                    <a href="#">
                        <i class="fa fa-laptop"></i>
                        <span>商品管理</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="product_list.html"><i class="fa fa-circle-o"></i> 商品列表</a></li>
                        <li><a href="new_product.html"><i class="fa fa-circle-o"></i> 商品新建</a></li>
                        <li><a href="product_kind.html"><i class="fa fa-circle-o"></i> 商品分类</a></li>
                    </ul>
                </li>

                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-edit"></i> <span>订单管理</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="hire_order.html"><i class="fa fa-circle-o"></i> 订单列表</a></li>
                        <!--<li><a href="pay_order.html"><i class="fa fa-circle-o"></i> 支付订单</a></li>-->
                        <!--<li><a href="operate_log.html"><i class="fa fa-circle-o"></i> 订单日志</a></li>-->
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-pie-chart"></i>
                        <span>会员管理</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="pay_order.html"><i class="fa fa-circle-o"></i> 会员记录</a></li>
                        <!--<li><a href="discounts.html"><i class="fa fa-circle-o"></i> 优惠卷中心</a></li>-->
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-pie-chart"></i>
                        <span>团购加盟</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="group_buy.html"><i class="fa fa-circle-o"></i> 团购信息</a></li>
                        <li><a href="join_in.html"><i class="fa fa-circle-o"></i> 加盟信息</a></li>
                        <!--<li><a href="order_data.html"><i class="fa fa-circle-o"></i>订单数据</a></li>-->
                        <!--<li><a href="user_data.html"><i class="fa fa-circle-o"></i>用户数据</a></li>-->
                        <!--<li><a href="income_data.html"><i class="fa fa-circle-o"></i>收入数据</a></li>-->
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-pie-chart"></i>
                        <span>活动管理</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="activity.html"><i class="fa fa-circle-o"></i> 活动管理</a></li>
                        <!--<li><a href="discounts.html"><i class="fa fa-circle-o"></i> 优惠卷中心</a></li>-->
                    </ul>
                </li>
            </ul>
        </section>
        <!-- /.sidebar -->
    </aside>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">


        <!-- Main content -->


        <section class="content">
            <div class="row">
                <div class="col-lg-1"></div>
                <div class="col-lg-10">
                    <h4><strong>商品详情</strong></h4>
                    <table class="col-lg-12 base_infor">

                        <tbody>
                        <tr class="base_infor1">
                            <td rowspan="2" class="table_base_title">基本信息</td>
                            <td>商品编号</td>
                            <td>商品名</td>
                            <td>商品图</td>
                            <td>商品价格</td>
                            <td>商品品牌</td>
                            <td>商品版型</td>
                            <!--<td>租赁次数</td>-->
                        </tr>
                        <tr class="table_data">

                        </tr>
                        </tbody>
                    </table>
                    <table class=" col-lg-12 product_num">
                        <tbody class="tableSize">
                        <tr style="background: #999999;height: 35px;">
                            <td id="stock_td" class="table_base_title">库存信息</td>
                            <td class="up_size">颜色</td>
                            <td class="up_size">尺码</td>
                            <td>库存</td>
                        </tr>
                        <!--<tr class="tableSize">-->
                        <!--&lt;!&ndash;<td  class="up_num">库存</td>&ndash;&gt;-->
                        <!--&lt;!&ndash;<td  class="all_num">100</td>&ndash;&gt;-->
                        <!--&lt;!&ndash;<td  class="all_num">100</td>&ndash;&gt;-->
                        <!--</tr>-->
                        </tbody>
                    </table>
                    <table class="col-lg-12 pic_infor">
                        <tbody>
                        <tr class="base_infor1">
                            <td rowspan="2" class="table_base_title">五图信息</td>
                            <td>轮播图1</td>
                            <td>轮播图2</td>
                            <td>轮播图3</td>
                            <td>轮播图4</td>
                            <td>轮播图5</td>
                        </tr>
                        <tr class="pic_data"></tr>
                        </tbody>
                    </table>
                </div>
            </div>


        </section>
        <!-- /.content -->
    </div>

    <!-- /.content-wrapper -->
    <footer class="main-footer">
        <div class="pull-right hidden-xs">
            <b>Version</b> 2.0.0
        </div>
        <strong>Copyright &copy; 2018-2019 <a href="http://www.han5j.com/">西安寒武纪信息科技有限公司</a>.</strong> All rights
        reserved.
    </footer>
</div>
<script src="js/jquery.min.js"></script>


<script src="js/jq.cookie.js"></script>
<script src="js/adminlte.min.js"></script>
<script type="text/javascript" src="js/moment.min.js"></script>
<script src="js/change_password.js"></script>
<script src="js/bootstrap.min.js"></script>
<script>
    function GetQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return unescape(r[2]);
        return null;
    }

    var index = GetQueryString('Index');
    $.ajax({
        type: "get",
        url: "http://www.puer.zone:30000/ProductDetailsInfo",
        async: true,
        data: {
            productId: index
        },
        success: function (data) {
            DataView(data);
        }
    });

    function DataView(data) {
        var tabs1 = `
						 <td>${data[0][1]}</td>
	       	 			 <td>${data[0][0]}</td>
	       	 			 <td><img src="${data[0][10]}" height="110px" width="90px"/></td>
	       	 			 <td>￥${data[0][3]}</td>
	       	 			 <td>${data[0][5]}</td>
	       	 			 <td>${data[0][6]}</td>
	       	 			 `;
        $('.table_data').html(tabs1);

        // for (var i=0;i<data[1].length;i++) {
        // 	var sizeTd='<td>'+data[1][i][0]+'</td>';
        // 	var numTd='<td>'+data[1][i][1]+'</td>';
        // 	$('.up_size').after(sizeTd);
        // 	$('.up_num').after(numTd);
        // }

        $("#stock_td").attr("rowSpan", data[0][9].length + 1);
        for (var i = 0; i < data[0][9].length; i++) {
            var tableSize = `<tr>
					    	<td>${data[0][9][i][0]}</td>
		       	 			<td>${data[0][9][i][1]}</td>
		       	 			<td>
		       	 				${data[0][9][i][2]}
		       	 			</td>
		       	 			</tr>
	       	 		`;
            $('.tableSize').append(tableSize);
        }

        // $('.all_num').html(data[2]);
        for (var i = 0; i < 5; i++) {
            var Td = `<td><img src="${data[1][i]}" width="100%" height="220px"/></td>`;
            $('.pic_data').append(Td)
        }
    }
</script>
</body>
</html>
